package com.talkology.pilot.common.enumeration;

public enum CourseStatus {
    PENDING(1, "PENDING"),
    CONFIRMED(2, "CONFIRMED"),
    CHANGED(3, "CHANGED"),
    CANCELED(4, "CANCELED"),
    DECLINED(5, "DECLINED");

    private static final java.util.Map<Integer, CourseStatus> VALUE_MAP;
    String name;
    int value;

    static {
        final com.google.common.collect.ImmutableMap.Builder<Integer, CourseStatus> b =
                com.google.common.collect.ImmutableMap.builder();
        for (CourseStatus enumItem : CourseStatus.values()) {
            b.put(enumItem.value, enumItem);
        }
        VALUE_MAP = b.build();
    }

    CourseStatus(int value, java.lang.String name) {
        this.value = value;
        this.name = name;
    }

    /**
     * Returns the name of the enumeration item
     *
     * @return the name of the enumeration item
     */
    public java.lang.String getName() {
        return name;
    }

    /**
     * @return integer value
     */
    public int getIntValue() {
        return value;
    }

    /**
     * @param valueArg the value of enum item.
     * @return corresponding TeInfoSource item
     */
    public static CourseStatus forValue(int valueArg) {
        return VALUE_MAP.get(valueArg);
    }
}
